home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / Rinaldi / HC 1.2 & 2.0 / FullRename 1.4.cpt / FullRename 1.4 (US) / card_3055.txt < prev    next >
Text File  |  1992-06-09  |  4KB  |  142 lines

  1. -- card: 3055 from stack: in.4 (US)
  2. -- bmap block id: 3273
  3. -- flags: 0000
  4. -- background id: 2661
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 01
  10. -- high flags: 0007
  11. -- rect: left=69 top=68 right=252 bottom=434
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 9
  17. -- style flags: 0
  18. -- line height: 12
  19. -- part name: 
  20.  
  21.  
  22. -- part 5 (button)
  23. -- low flags: 00
  24. -- high flags: A003
  25. -- rect: left=174 top=281 right=311 bottom=343
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: FullRename
  34. ----- HyperTalk script -----
  35. on mouseUp
  36.   answer "Rename a :" with "File" or "Folder"
  37.   put it into What
  38.   if What is "File"
  39.   then
  40.   put FilePath(empty,"File to rename") into Path
  41. else
  42.   put FolderName("Folder to rename") into Path
  43.   delete last char of Path
  44. end if
  45.  
  46. if Path is empty then exit mouseUp
  47.  
  48. ask "New name :" with leafName(Path)
  49. if it ‚↠empty
  50. then
  51. FullRename Path,it
  52. if the Result ‚↠empty
  53. then answer the Result
  54. else answer What && "renamed"
  55. end if
  56. end mouseUp
  57.  
  58.  
  59.  
  60. -- part contents for card part 1
  61. ----- text -----
  62.  
  63.  
  64.                                              FullRename 1.4
  65.  
  66.                                           by Fr√©d√©ric RINALDI
  67.  
  68.  
  69. DESCRIPTION
  70. ------------
  71.   FullRename XCMD allows to rename a file or folder, keeping previous privileges when working on a server folder.
  72.  
  73.  
  74. SYNTAX
  75. --------
  76.     FullRename <file/folder pathname>,<new name>[,"DontResolveAlias"]
  77.  
  78. PARAMETERS
  79. ------------
  80.  
  81.    <file/folder pathname> can be a single name or whole pathname. If just a single name is supplied, the file is assumed to be in the same folder than the current stack.
  82.  
  83.    <new name> is a simple string.
  84.  
  85.    "dontResolveAlias" allows to deal with an alias file itself (System 7.0 only) rather than with the file pointed by it.
  86.  
  87.    Using "!", "?" or "=" as first parameter will return an online help (resp. copyright, syntax and output).
  88.  
  89.  
  90. USING
  91. -----
  92. If an error occurs, FullRename can return :
  93.  
  94.      "Error : Not a file"
  95.      "Error : Not a folder"
  96.      "Error : Alias file not supported"
  97.      "Error : Volume not found"
  98.      "Error : Bad Name"
  99.      "Error : File not found"
  100.      "Error : Folder not found"
  101.      "Error : File is busy"
  102.      "Error : I/O Error"
  103.      "Error : Folder is full"
  104.      "Error : Volume is locked"
  105.      "Error : No resource fork"
  106.      "Error : Duplicate file/folder name"
  107.      "Error : Moving whole volume not allowed"
  108.      "Error : Not an AppleShare volume"
  109.      "Error : AppleShare insufficient privileges"
  110.      "Error : Missing or empty parameter(s)"
  111.      "Error : Seconds params must be a single name"
  112.      "Error : Third param can only be "DontResolveAlias""
  113.  
  114.  
  115. HISTORY
  116. -------
  117. 1.4                                                                                            06/09/92
  118. ‚Ä¢ Fixed volume renaming when file has the same name
  119.  
  120. 1.3                                                                                            03/10/92
  121. ‚Ä¢ Fixed volume renaming
  122.  
  123. 1.2 :                                                                                          12/25/91
  124. ‚Ä¢ Fixed alias file bug under System 7.0.1
  125.  
  126. 1.1 :
  127. ‚Ä¢ Added support for System 7.0 alias files
  128. ‚Ä¢ General enhancement of the code
  129. ‚Ä¢ Added "DontResolveAlias" parameter
  130. ‚Ä¢ Added "=" param for online help
  131.  
  132.  
  133. This stack uses FilePath  XFCN (¬© 1898, 1990 Apple Computer, Inc.)
  134. LeafName XFCN (by Kevin CALHOUN), FolderName XFCN (by Eric CARLSON ,and Anup MURARKA)
  135. --------------------------------------------------------------------
  136.  
  137. This (these) external(s) is (are) FreeWare,allowing unlimited use in any non-commercial stack. You just need in this case to mention the author's name and copyright in your stack.
  138. Any commercial use must be licensed and aknowledged by the author.
  139.  
  140.                                ¬© Frederic RINALDI 1990‚Ķ1992
  141.  
  142. AppleLink: RINALDI1        CalvaCom : FR10        Compuserve : 71170,2111